import {createWebHashHistory,createRouter } from "vue-router";

import  index from '../view/index.vue'
import  user from '../view/user.vue'
import  ticket from '../view/ticket.vue'
import  station from '../view/station.vue'
import  login from '../view/Login.vue'
import  train from '../view/train.vue'
import  trainRoute from '../view/trainRoute.vue'
import  uncommit from '../view/uncommit.vue'
import  commit from '../view/commit.vue'
import  schedule from '../view/schedule.vue'
// import  sqlTicket from '../view/sqlTicket.vue'
 import  pieChart from '../view/pieChart.vue'
 import  register from '../view/register.vue'
 import  mapContainer from '../view/MapContainer.vue'
 import  finish from '../view/finish.vue'



const routes = [
    {
      path: '/login',
      component: login
    },
  {
      path: '/register',
      component: register
    },
  {
    path: '/',
    name: 'index',
    component: index,
    children:[
        {
          path: '/user',
          component: user
        },
      {
        path: '/ticket',
        component: ticket
      },
      {
        path: '/station',
        component: station
      },
      {
        path: '/train',
        component: train
      },
      {
        path: '/trainRoute',
        component: trainRoute
      },
      {
        path: '/uncommit',
        component: uncommit
      },
      {
        path: '/commit',
        component: commit
      },
      {
        path: '/schedule',
        component: schedule
      },
      {
        path: '/pieChart',
        component: pieChart
      },
      {
        path: '/mapContainer',
        component: mapContainer
      },
      {
        path: '/finish',
        component: finish
      },

      // {
      //   path: '/sqlTicket',
      //   component: sqlTicket
      // }
    ]
  }

]
const router = createRouter({
  history: createWebHashHistory(),
  routes
})
export default router;












